<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* backgroud-repeat属性用来设置背景的重复模式。 */
        /* 值  repeat (xy均平埔  默认) repeat-x repeat-y no-repeat(不平铺)*/
        div{
            width: 300px;
            height: 300px;
            border: 1px solid #000;
            margin-bottom: 10px;
            background-image: url(2.png);
        }
        div.box1{background-repeat: repeat;}
        div.box2{background-repeat: repeat-x;}
        div.box3{background-repeat: repeat-y;}
        div.box4{background-repeat: no-repeat;}
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
    <div class="box4"></div>
</body>
</html>